<div id="content">
	<div id="job_history">
	<?php __('Recent viewed jobs:');?>
		<ul>
		</ul>
	</div>
	<?php if (isset($query)&&isset($paginator)) : ?>
	<div class="content">
	<?php
	$options = array('url'=> array('controller' => 'frondends', 'action' => 'search', '?' => 'query='.$query));
	$this->Paginator->options($options);?>
		<div id="jobs">
			<table class="jobs">
				<tbody>
					<tr class='round'>
						<th><?php echo $this->Paginator->sort('name');?>
						</th>
						<th><?php echo $this->Paginator->sort('position');?>
						</th>
						<th><?php echo $this->Paginator->sort('company');?>
						</th>
					</tr>
					<?php
					$i = 0;
					foreach ($jobs as $job):
					$class = null;
					if ($i++ % 2 == 0) {
						$class = ' class="even"';
					}else{
						$class = ' class="odd"';
					}
					?>
					<tr <?php echo $class;?>>
						<td class="location"><?php echo $job['Job']['name']; ?>&nbsp;</td>
						<td class="position"><?php echo $this->Html->link($job['Job']['position'], array('controller' => 'Jobs', 'action' => 'view', $job['Job']['id'])); ?>
						</td>
						<td class="company"><?php echo $job['Job']['company']; ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<p>
			<?php
			echo $this->Paginator->counter(array(
				'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
			));
			?>
			</p>

			<div class="pagination">
			<?php // echo $this->Paginator->first('<<', array(), null, array('class'=>'first')); ?>
			<?php echo $this->Paginator->first('<img alt="First page" src="http://www.jobeet.org/images/first.png">', array('escape'=>false), null, array('class'=>'first')); ?>
			<?php //echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
			<?php echo $this->Paginator->prev('<img title="Previous page" alt="Previous page" src="http://www.jobeet.org/images/previous.png">',array('escape'=>false), null, array('class'=>'disabled','escape'=>false));?>
				|
				<?php echo $this->Paginator->numbers();?>
				|
				<?php // echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
				<?php //echo $paginator->last('>>', array(), null, array('class'=>'last')); ?>
				<?php echo $this->Paginator->next('<img title="Next page" alt="Next page"  src="http://www.jobeet.org/images/next.png">' ,  array('escape'=>false), null, array('class' => 'disabled','escape'=>false));?>
				<?php echo $paginator->last('<img title="Last page" alt="Last page" src="http://www.jobeet.org/images/last.png">',  array('escape'=>false), null, array('class'=>'last')); ?>
			</div>
		</div>
	</div>
	<?php endif ?>
</div>
